package com.person.modules.sys.controller;

import com.person.common.utils.PageUtils;
import com.person.common.utils.R;
import com.person.modules.sys.entity.SysAuditEntity;
import com.person.modules.sys.service.SysAuditService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;

import java.util.Map;


@Controller
public class SysAuditController extends AbstractController{
    @Autowired
    SysAuditService sysAuditService;
    /**
     * 审核
     */
    @RequestMapping("/sys/audit")
    @RequiresPermissions("sys:audit")
    @CrossOrigin
    @ResponseBody
    @Transactional(rollbackFor = Exception.class)
    public R audit(SysAuditEntity sysAuditEntity){
            sysAuditService.audit(sysAuditEntity);
            return R.ok();
    }
}
